CREATE TABLE jms_dm.dm_mng_customer_daliy_agent_summary_dt
(
    type             int comment '1代表代理区汇总,2代表代理区项目汇总',
    agent_code       varchar(100) comment '代理区编码',
    project_name     varchar(100) comment '项目名称',
    agent_name       varchar(100) comment '代理区名称',
    way_total        int comment '流入量',
    void_num         int comment '取消量',
    need_soft_num    int comment '应妥投量',
    actual_soft_num  int comment '实际妥投量',
    no_soft_num      int comment '未妥投量',
    sign_num         int comment '签收量',
    transport_num    int comment '快件在途量',
    del_war_num      int comment '派件中量',
    work_order_num   int comment '客诉量',
    arbitration_num  int comment '丢失量',
    express_num      int comment '破损量',
    7d_update_num    int comment '轨迹断更量',
    date_time        date comment '日期'
) ENGINE = OLAP DUPLICATE KEY(type,agent_code,project_name)
COMMENT "客服日报代理区-代理区汇总"
PARTITION BY RANGE(date_time)
(START ("2022-09-01") END ("2022-09-30") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(date_time) BUCKETS 1
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-360",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "1",
"in_memory" = "false",
"storage_format" = "V2"
);
